package expressiontree;

import tokens.Token;

/**
 * A Tree Node for the expression tree.
 * @author James Santos-Calacat
 *
 */
public class ExpressionTreeNode 
{
	/**
	 * The token to be put into the node.
	 */
	private Token token;
	/**
	 * Left node.
	 */
	public ExpressionTreeNode left;
	/**
	 * Right node.
	 */
	public ExpressionTreeNode right;
	
	/**
	 * Constructs an expression tree node that holds a token.
	 * @param the_token The token.
	 * @param the_left The left.
	 * @param the_right The right.
	 */
	public ExpressionTreeNode(final Token the_token, 
							  final ExpressionTreeNode the_left,
							  final ExpressionTreeNode the_right)
	{
		token = the_token;
		left = the_left;
		right = the_right;
	}
	
	/**
	 * Returns the token.
	 * @return What token is in your node?
	 */
	public Token getToken()
	{
		return token;
	}
	
}
